<template>
  <div>
    <NavMenu></NavMenu>
    <div id="basicInfo">
      <h2>公司基本信息</h2>
      <p>
        公司成立于2014年9月, 是国内最领先的橡塑B2B电商平台, 以技术驱动为核心整合上下游产业链, 通过自营+撮合的运营方式, 覆盖高附加值...
      </p>
    </div>
    <el-table :data="tableData" stripe style="width: 100%">
      <el-table-column prop="job" label="职位名称" width="180">
      </el-table-column>
      <el-table-column prop="num" label="职位数量" width="180">
      </el-table-column>
      <el-table-column prop="salary" label="薪资" width="180">
      </el-table-column>
      <el-table-column prop="desc" label="职位描述">
      </el-table-column>
    </el-table>
    <Comments></Comments>
  </div>
</template>

<script>
import NavMenu from "@/components/NavMenu";
import Comments from "@/components/Comments";
import ajax from "@/components/ajax";
export default {
  name: "JobInfo",
  data() {
    return {
      tableData: []
    };
  },
  methods: {
    goToDetail() {
      // this.$router.push({
      //   // path: "/JobDetailInfo"
      // });
    }
  },
  beforeCreate() {
    const _id = this.$route.query.id;
    const that = this;
    ajax({
      method: "get",
      url: "http://127.0.0.1:3000/company=" + _id,
      withCredentials: true,
      success: function(res) {
        that.tableData = res;
      }
    });
    // console.log("cookie", document.cookies);
  },
  components: {
    NavMenu,
    Comments
  }
};
</script>

<style>
#app {
  font-family: "Avenir", Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-align: center;
  color: #2c3e50;
  /* margin-top: 60px; */
}
#basicInfo {
  margin-bottom: 40px;
}
</style>
